<html>
  <head>
    <title>Listing 2.3 A JavaScript Function</title>
    <script language="JavaScript" type="text/javascript">
      <!--
     // if(confirm("Do you want to know the time?")){
//	display_time()
 //     }
      
      function display_time(){
	var now=new Date()
	var hours=now.getHours()
	var minutes=now.getMinutes()
	var seconds=now.getSeconds()
	var current_time=hours+":"+minutes+":"+seconds
	alert("The current time where you are is "+current_time)
      }
      //-->
    </script>
  </head>
  <body>
     <a href="#" onClick="display_time()">Time</a>
  </body>
</html>
